flutter elevated button radius

132

style: ButtonStyle(
  shape: MaterialStateProperty.all<RoundedRectangleBorder>(
    RoundedRectangleBorder(
      borderRadius: BorderRadius.circular(18.0),
      side: BorderSide(color: Colors.red)
    )
  )
)
    
        RaisedButton(
                onPressed: () {},
                color: Colors.amber,
                shape: RoundedRectangleBorder(
                    borderRadius: BorderRadius.circular(10)),
                child: Text("Click This"),
              )
    
ElevatedButton(
  onPressed: () {},
  style: ElevatedButton.styleFrom(
  	shape: new RoundedRectangleBorder(
    	borderRadius: new BorderRadius.circular(30.0),
  	),
  ),
  child: Text(
    "Click ME!!"
  ),
)
ElevatedButton(
    onPressed: () {},
    style: ElevatedButton.styleFrom(
        padding: EdgeInsets.symmetric(horizontal: 40.0, vertical: 20.0),
        shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.circular(10.0)
        ),
        primary: Colors.purple
    ),
    child: Text(
        "CLICK ME",
        style: TextStyle(color: Colors.white, fontSize: 18),
    ),
)
shape: RoundedRectangleBorder(
  borderRadius: BorderRadius.circular(18.0),
  side: BorderSide(color: Colors.red)
),
ElevatedButton(
  onPressed: () {},
  child: Text('Button'),
  style: ElevatedButton.styleFrom(shape: StadiumBorder()),
)

Comments

Submit
0 Comments